package com.xsx.mybatis.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xsx.mybatis.bean.Users;
import com.xsx.mybatis.service.UsersService;

@Controller
public class UsersController {
	@Autowired
	UsersService usersService;
	
	@RequestMapping("/getUsers")
	public String users(Map<String, Object> map) {
		List<Users> userslist = usersService.getUsers();
//		1.查员工
		map.put("allUsers", userslist);
		return "list";
	}
}
